<link rel="stylesheet" type="text/css" href="<?php echo url::base(FALSE) ?>css/content.css">
<table>
    <tr><td id="dblokasi">Database Lokasi</td><td></td></tr>
    <tr colspan="3">
		<td align="center">
			<?php if (isset($errors)) : //jika ada variabel error?>
            <?php foreach ($errors as $error): ?>
            <div><?php echo $error ?></div>
            <?php endforeach ?>
            <?php endif ?>
		</td>
	</tr>
	<tr>
        <td width="70%" class="content">
            <table border="1" align="center" width="100%" class="tabcontent">
                <tr>
                    <td width="50">ID</td>
                    <td>Nama</td>
                    <td>Alamat</td>
                </tr>
                <?php if (isset($lokasi)): ?>
                <?php foreach ($lokasi->get_all_lokasi() as $row) : ?>
                <tr>
                    <td><?php echo $row->ID_lokasi ?></td>
                    <td><?php echo $row->nama ?></td>
                    <td><?php echo $row->alamat ?></td>
                </tr>
                <?php endforeach ?>
                <?php endif; ?>
            </table>
        </td>
        <td class="input">
            <form action="<?php echo url::site().'lokasi' ?>" method="post" >
                <table cellspacing="5">
                    <tr><td colspan="3" align="center">Tambah Lokasi Baru</td></tr>
                    <tr>
                        <td>Nama Lokasi</td><td style="width:5px">:</td><td align="right"><input name="nama" type="text"/></td>
                    </tr>
                    <tr>
                        <td>Alamat</td><td style="width:5px">:</td><td align="right"><input name="alamat" type="text"/></td>
                    </tr>
                    <tr>
                        <td colspan="2"></td><td align="right"><input type="submit" value="Submit" /></td>
                    </tr>
                </table>
            </form>
        </td>
    </tr>
</table>